package game.game2;

import javax.imageio.ImageIO;
import java.awt.*;
import java.io.IOException;
import java.io.InputStream;

public class gameutil {

    public static Image getImage(String path){
        InputStream u = gameutil.class.getClassLoader().getResourceAsStream(path);
        try {
            return ImageIO.read(u);
        }catch (IOException e){
            e.printStackTrace();
        }
        return null;

    }

    public static void main(String[] args) throws IOException {
        Image img = gameutil.getImage("img/fj.jpg");
        System.out.println(img);
    }
}
